package com.elin4it.ssm.service;

import com.elin4it.ssm.mapper.GameRoomMapper;
import com.elin4it.ssm.pojo.GameRoom;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

/**
 * @Author:TY
 * @Descroption:
 * @Date: Created in 10:18 2018/4/9
 * @Modificd By:
 */
@Service("GameRoomService")
public class GameRoomServiceimpl implements GameRoomService {
    @Autowired
    GameRoomMapper gameRoomMapper;
    public void insert(GameRoom record) {
        gameRoomMapper.insert(record);
    }

    public int selectByRoomId() {
        int roomId=gameRoomMapper.selectByRoomId();
        return roomId;
    }

    public List<GameRoom> selectOpenidBelongToGameRoom(String openid1, String openid2) {
        List<GameRoom> list=new ArrayList<GameRoom>();
        list=gameRoomMapper.selectOpenidBelongToGameRoom(openid1,openid2);
        return list;
    }
}
